from fastapi import FastAPI
import uvicorn

app = FastAPI()

@app.get("/")
def read_root():
   return {"message": "Hello, World!"}

@app.get("/items/{item_id}")
def read_item(item_id: int, q: str = None):
   return {"item_id": item_id, "q": q}

@app.post("/items/")
def create_item(item: dict):
   return {"item": item}

if __name__ == "__main__":
   uvicorn.run("app:app",host="0.0.0.0",port=7860,reload=False,log_level="info")
